package com.chagee.store.operation.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * @Author : hk
 * @Date : 2025/3/20
 */

@Getter
@AllArgsConstructor
public enum RecordTypeEnum {

	// 任务申诉
	TASK_APPEAL("TASK_APPEAL", "任务申诉"),

	// 工单申诉
	ORDER_APPEAL("ORDER_APPEAL", "工单申诉"),

	// 任务申诉审核
	APPROVAL_TASK_APPEAL("APPROVAL_TASK_APPEAL", "任务申诉审核"),

	//工单申诉审核
	APPROVAL_ORDER_APPEAL("APPROVAL_ORDER_APPEAL", "工单申诉审核"),

	;

	private final String type;
	private final String desc;

	public static RecordTypeEnum getByType(String type) {
		for (RecordTypeEnum value : values()) {
			if (Objects.equals(value.getType(), type)) {
				return value;
			}
		}
		return null;
	}
}
